package com.ruix.app.mapper;


import org.json.JSONObject;

/**
 * Created by hadexs on 2017/7/7.
 */

public class OrderMentorMapper implements ApiMapper<String>{

    @Override
    public String transform(JSONObject response) {
        if (response != null){
           JSONObject data =  response.optJSONObject("data");
            if (data != null){
                JSONObject classinfo =   data.optJSONObject("class_info");
                if (classinfo != null){
                   return classinfo.optString("id","");

//                    "class_info": {
//
//                        "encrypt_id": "/jRl4vBqrXQIZbztAHgBBA==",
//
//                                "id": 35,
//
//                                "name": "测试001",
//
//                                "introduce": "<p>大家有关测试消息请都发布在这个圈子</p><p>尽可能的解决自己的问题</p><p><img src=\"http://ruix.oss-cn-shanghai.aliyuncs.com/introduce/201707/12/43551499844725.jpeg\"></p>",
//
//                                "price": 1,
//
//                                "num": 13
//                    },

                }
            }
        }


        return null;
    }
}
